﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>入库单</title>
    <script src="/Apm/js/CMSView.js"></script>
    <style>
        .toolsbar {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            background-color: #393D49;
            padding: 1rem;
        }
        .layui-table, .layui-table-view{
            margin:0 !important;
        }
    </style>
</head>
<body>
    <div class="page">
        <div class="toolsbar">
            <button id="Print" class="layui-btn">
                <i class="iconfont">&#xe6c9;</i> 打印
            </button> 
        </div>
        <div class="content">
            <table id="tableView" lay-filter="dataView"></table>
        </div>
    </div>
</body>
</html>
<script>
    layui.use(['layer', 'table'], function () {
        var layer = layui.layer,
            table = layui.table;

        var guid = getUrlParam('guid');

        //打印
        $("#Print").click(function () {
            layer.msg('打印功能待实现');
            
        })
        ajaxget({
            url: 'api/FriendFlowerPublic/GetOrderStorageInfoList?Guid=' + guid,
            success: function (data) {

                table.render({
                    id: 'dataView',
                    elem: '#tableView',
                    cols: [
                        [
                            { field: 'FlowerTypeName', title: '品名', align: 'center', minWidth:120, rowspan: 2, fixed: 'left' },
                            { align: 'center', title: '入库数量', colspan: 4 },
                            { align: 'center', title: '入库单价', colspan: 4 }
                        ],
                        [
                            { field: 'NumA', title: 'A品数量', align: 'right', minWidth:  120 },
                            { field: 'NumB', title: 'B品数量', align: 'right', minWidth: 120 },
                            { field: 'NumC', title: 'C品数量', align: 'right', minWidth: 120 },
                            { field: 'NumD', title: 'D品数量', align: 'right', minWidth: 120 },
                            { field: 'PriceA', title: 'A品价格', align: 'right', minWidth: 120 },
                            { field: 'PriceB', title: 'B品价格', align: 'right', minWidth: 120 },
                            { field: 'PriceC', title: 'C品价格', align: 'right', minWidth: 120 },
                            { field: 'PriceD', title: 'D品价格', align: 'right', minWidth: 120 }
                        ]
                    ],
                    data: data,
                    height: 'full-68',
                    limit: 20,
                    limits: [20, 40, 60],
                    page: true
                })
            }
        })



    })

</script>